package org.jprobe.junit;
/**
 * junit test generation specification
 * @author Hussain Al-Mutawa
 * @version 2.0
 * @since 2.0
 */
public interface JunitGeneratorInterface {

	/**
	 * gets the time after which the generation of any test case should terminate
	 * @return time in seconds
	 */
	int getTimeOut();

	/**
	 * gets list of classes which have failed because an
	 * exception was thrown during the process
	 * @param reportCategory the category of report, e.g.  [successful, NullPointerException, CodeGenException, etc.]
	 * @return list of classes that have failed generation test cases
	 */
	Object[] getTestCasesThrowingException(final String reportCategory);

	/**
	 * gets list of report categories
	 * @return categories of test cases generation
	 */
	Object[] getReportCategories();

	/**
	 * gets the proption of successful test cases generation to failed ones
	 * @return
	 */
	double getSuccessRate();

	void generateAll();

	void printReport();

	/**
	 * generates test cases for a given package in the project
	 * @param pkg the package for which test cases are generated
	 */
	void generateTestCasesForPackage(final String pkg);

	/**
	 * genertes a junit test case against a class
	 * @param clazz the class to be tested
	 */
	void generateTestCasesForClass(final Class<?> clazz);
	/**
	 * this evernt is triggered when the progress is changed
	 * @param progress the current progress which is an integer
	 * when related to the total number of transactions, can be
	 * understood as a percentage of what has finished so far
	 */
	void progressChanged(int progress);

}